import request from '@/utils/request'
export function getDepartment() {
  return request({
    method: 'GET',
    url: '/company/department'
  })
}

export function getManagerList() {
  return request({
    method: 'GET',
    url: '/sys/user/simple'
  })
}

export function addDepartment(data) {
  return request({
    method: 'POST',
    data,
    url: '/company/department'
  })
}

export function getDepartmentDetail(id) {
  return request({
    method: 'GET',
    url: `/company/department/${id}`
  })
}

export function delDepartment(id) {
  return request({
    method: 'DELETE',
    url: `/company/department/${id}`
  })
}

export function updateDepartment(data) {
  return request({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data
  })
}

